--------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/22d_FirstDiffValidity_log.txt
  log type:  text
 opened on:  25 Jun 2026, 13:04:58
r; t=0.00 13:04:58

. 
. /*------------------------------------------------------------------
>   Build trust composite (mirrors 07/22c) and persist tempfile.
> ------------------------------------------------------------------*/
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.11 13:04:58

. 
. local jeea_controls hhven_spouse hhven_other jobopp labven typeworkven1 ///
>                     typeworkven2 typeworkven3 written_cont average yrseduc ///
>                     healthmig frdfam smartven owner waterven sewageven ///
>                     female age_panel child_venez time_col
r; t=0.00 13:04:58

. 
. foreach src in general_trust trust_col trust_ven {
  2.     capture drop _z_`src'
  3.     gen _z_`src' = .
  4.     forvalues w = 1/2 {
  5.         qui sum `src' if pep == 0 & wave_num == `w'
  6.         if r(N) > 0 & r(sd) > 0 {
  7.             replace _z_`src' = (`src' - r(mean)) / r(sd) if wave_num == `w'
  8.         }
  9.     }
 10. }
(13,580 missing values generated)
(8,200 real changes made)
(5,084 real changes made)
(13,580 missing values generated)
(4,203 real changes made)
(2,557 real changes made)
(13,580 missing values generated)
(4,231 real changes made)
(2,570 real changes made)
r; t=0.03 13:04:58

. egen trust_raw = rowmean(_z_general_trust _z_trust_col _z_trust_ven)
(282 missing values generated)
r; t=0.01 13:04:58

. capture drop trust_index
r; t=0.00 13:04:58

. gen trust_index = .
(13,580 missing values generated)
r; t=0.00 13:04:58

. forvalues w = 1/2 {
  2.     qui sum trust_raw if pep == 0 & wave_num == `w'
  3.     if r(N) > 0 & r(sd) > 0 {
  4.         replace trust_index = (trust_raw - r(mean)) / r(sd) if wave_num == `w'
  5.     }
  6. }
(8,213 real changes made)
(5,085 real changes made)
r; t=0.01 13:04:58

. drop _z_* trust_raw
r; t=0.00 13:04:58

. 
. tempfile pepsample
r; t=0.00 13:04:58

. save `pepsample'
file C:\Users\wb614536\AppData\Local\Temp\ST_7cc4_000001.tmp saved as .dta format
r; t=0.15 13:04:58

. 
. /*------------------------------------------------------------------
>   Outcome list (matches body Tables 3-9) and treatment unit
> ------------------------------------------------------------------*/
. local outcomes ///
>     jeea_index_wellbeing labour_income gasto_capita health_pca ///
>     jeea_index_services sisben subs has_bank_account govtr ///
>     jeea_index_labor employed formal hora_semana ///
>     index_integration belonging feel_integrated col_friends community_org connection_colombia ///
>     trust_index general_trust trust_col trust_ven colombians_help_me venezuelans_help_me ///
>     index_food skip_meals went_without_food protein_days ///
>     index_housing adequate_housing has_electricity has_water has_sewage
r; t=0.00 13:04:58

. 
. local trts ///
>     pep pep trt_hh pep ///
>     pep pep pep trt_hh trt_hh ///
>     pep pep pep pep ///
>     pep pep pep pep pep pep ///
>     pep pep pep pep pep pep ///
>     pep pep pep pep ///
>     pep pep pep pep pep
r; t=0.00 13:04:58

. 
. local n : word count `outcomes'
r; t=0.00 13:04:58

. 
. /*==============================================================================
>   BLOCK A — Validity on the panel sub-sample
> ==============================================================================*/
. di ""

r; t=0.00 13:04:58

. di "=================================================================="
==================================================================
r; t=0.00 13:04:58

. di "  BLOCK A: validity exhibits on panel sub-sample"
  BLOCK A: validity exhibits on panel sub-sample
r; t=0.00 13:04:58

. di "=================================================================="
==================================================================
r; t=0.00 13:04:58

. 
. /*------------------------------------------------------------------
>   Define the panel sub-sample at the individual level: units with
>   sample_reg == 1 in both waves. Take one row per id (use W1 row, or
>   W2 if W1 missing) so date and pre-migration covariates are
>   unambiguous and not duplicated across waves.
> ------------------------------------------------------------------*/
. use `pepsample', clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.09 13:04:58

. keep if sample_reg == 1
(742 observations deleted)
r; t=0.02 13:04:58

. keep if !missing(wave_num) & inlist(wave_num, 1, 2)
(0 observations deleted)
r; t=0.00 13:04:58

. 
. bysort id wave_num: keep if _n == 1
(0 observations deleted)
r; t=0.04 13:04:58

. bysort id: gen _waves = _N
r; t=0.00 13:04:58

. bysort id: egen _has_w1 = max(wave_num == 1)
r; t=0.01 13:04:58

. bysort id: egen _has_w2 = max(wave_num == 2)
r; t=0.01 13:04:58

. gen panel_obs = (_has_w1 == 1 & _has_w2 == 1)
r; t=0.00 13:04:58

. 
. * Keep one row per id, using W1 row when present (so date / covariates are W1)
. gsort id wave_num
r; t=0.02 13:04:58

. bysort id: keep if _n == 1
(5,031 observations deleted)
r; t=0.03 13:04:59

. keep if panel_obs == 1
(2,776 observations deleted)
r; t=0.02 13:04:59

. count
  5,031
r; t=0.00 13:04:59

. di "  panel sub-sample (id-level): `=r(N)'"
  panel sub-sample (id-level): 5031
r; t=0.00 13:04:59

. 
. * McCrary density on panel sub-sample
. local mc_T  .
r; t=0.00 13:04:59

. local mc_p  .
r; t=0.00 13:04:59

. capture rddensity date, c(0)
r; t=0.23 13:04:59

. if !_rc {
.     local mc_T = e(T_q)
r; t=0.00 13:04:59
.     local mc_p = e(pv_q)
r; t=0.00 13:04:59
. }
r; t=0.00 13:04:59

. 
. * Joint balance F at three bandwidths
. gen rd_above = (date >= 0) if !missing(date)
r; t=0.00 13:04:59

. foreach h in 100 60 40 {
  2.     local jt_F_h`h' .
  3.     local jt_p_h`h' .
  4.     capture qui reg rd_above `jeea_controls' date if abs(date) <= `h'
  5.     if !_rc {
  6.         capture qui test `jeea_controls'
  7.         if !_rc {
  8.             local jt_F_h`h' = r(F)
  9.             local jt_p_h`h' = r(p)
 10.         }
 11.     }
 12. }
r; t=2.75 13:05:02

. 
. * First-stage for the FD spec.  Note: PEP take-up is essentially
. * time-invariant after 2018 (W1 = 2020, W2 = 2021), so $\Delta T \approx 0$
. * for nearly all units. The fuzzy treatment used by 22c_FirstDiffMain.do
. * is therefore the LEVEL $T_{W2}$ on the panel sub-sample, which is the
. * relevant first-stage to report.  We also report the (mechanically tiny)
. * discontinuity in $\Delta T$ as a transparency exercise.
. foreach trt in pep trt_hh {
  2.     use `pepsample', clear
  3.     keep if sample_reg == 1
  4.     keep if !missing(wave_num) & inlist(wave_num, 1, 2)
  5. 
.     if "`trt'" == "trt_hh" {
  6.         keep family_id wave_num date `trt'
  7.         bys family_id wave_num: keep if _n == 1
  8.         local panelid family_id
  9.     }
 10.     else {
 11.         keep id family_id wave_num date `trt'
 12.         bys id wave_num: keep if _n == 1
 13.         local panelid id
 14.     }
 15.     keep `panelid' wave_num date `trt'
 16.     reshape wide date `trt', i(`panelid') j(wave_num)
 17. 
.     capture confirm variable date1
 18.     if _rc == 0 gen date_use = date1
 19.     else        gen date_use = date2
 20. 
.     capture confirm variable `trt'2
 21.     local has_w2 = (_rc == 0)
 22.     capture confirm variable `trt'1
 23.     local has_w1 = (_rc == 0)
 24. 
.     * (i) Level first-stage on T_W2 (used by 22c_FirstDiffMain.do)
.     if `has_w2' == 1 {
 25.         capture rdrobust `trt'2 date_use, c(0) ///
>             kernel(triangular) bwselect(mserd) p(1)
 26.         if !_rc & !missing(e(tau_cl)) {
 27.             local fs_`trt'_b = e(tau_cl)
 28.             local fs_`trt'_s = e(se_tau_cl)
 29.             local fs_`trt'_p = e(pv_cl)
 30.             local fs_`trt'_n = e(N_h_l) + e(N_h_r)
 31.             local fs_`trt'_h = e(h_l)
 32.         }
 33.         else {
 34.             local fs_`trt'_b .
 35.             local fs_`trt'_s .
 36.             local fs_`trt'_p .
 37.             local fs_`trt'_n .
 38.             local fs_`trt'_h .
 39.         }
 40.     }
 41.     else {
 42.         local fs_`trt'_b .
 43.         local fs_`trt'_s .
 44.         local fs_`trt'_p .
 45.         local fs_`trt'_n .
 46.         local fs_`trt'_h .
 47.     }
 48.     di "  FS T_W2 (`trt'): b=" %6.3f `fs_`trt'_b' " (" %6.3f `fs_`trt'_s' ")  p=" %5.3f `fs_`trt'_p' "  N=" `fs
> _`trt'_n'
 49. 
.     * (ii) Change first-stage on Delta_T (mechanically near zero)
.     if `has_w1' == 1 & `has_w2' == 1 {
 50.         gen dT = `trt'2 - `trt'1
 51.         capture rdrobust dT date_use, c(0) ///
>             kernel(triangular) bwselect(mserd) p(1)
 52.         if !_rc & !missing(e(tau_cl)) {
 53.             local dt_`trt'_b = e(tau_cl)
 54.             local dt_`trt'_s = e(se_tau_cl)
 55.             local dt_`trt'_p = e(pv_cl)
 56.         }
 57.         else {
 58.             local dt_`trt'_b .
 59.             local dt_`trt'_s .
 60.             local dt_`trt'_p .
 61.         }
 62.         drop dT
 63.     }
 64.     else {
 65.         local dt_`trt'_b .
 66.         local dt_`trt'_s .
 67.         local dt_`trt'_p .
 68.     }
 69.     di "  FS Delta_T (`trt'): b=" %6.3f `dt_`trt'_b' " (" %6.3f `dt_`trt'_s' ")  p=" %5.3f `dt_`trt'_p'
 70. }
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
-----------------------------------------------------------------------------
(20 missing values generated)
  FS T_W2 (pep): b= 0.475 ( 0.045)  p=0.000  N=1126
(3,804 missing values generated)
  FS Delta_T (pep): b= 0.000 ( 0.000)  p=    .
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(9,207 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations            3,631   ->   2,219       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                 trt_hh   ->   trt_hh1 trt_hh2
-----------------------------------------------------------------------------
  FS T_W2 (trt_hh): b= 0.504 ( 0.100)  p=0.000  N=340
(807 missing values generated)
  FS Delta_T (trt_hh): b= 0.000 ( 0.000)  p=    .
r; t=4.78 13:05:06

. 
. /*------------------------------------------------------------------
>   Write Table A: FD validity panel
> ------------------------------------------------------------------*/
. file open V using "$atab/tabA_fd_validity.tex", write replace text
r; t=0.02 13:05:06

. file write V "\begin{table}[!htbp]" _n
r; t=0.00 13:05:06

. file write V "\centering" _n
r; t=0.00 13:05:06

. file write V "\caption{Validity exhibits for the first-differences fuzzy regression-discontinuity specification (p
> anel sub-sample)}" _n
r; t=0.00 13:05:06

. file write V "\label{tab:fd_validity}" _n
r; t=0.00 13:05:06

. file write V "\begin{threeparttable}" _n
r; t=0.00 13:05:06

. file write V "\begin{tabular}{lc}" _n
r; t=0.00 13:05:06

. file write V "\toprule" _n
r; t=0.00 13:05:06

. file write V " & Panel sub-sample \\" _n
r; t=0.00 13:05:06

. file write V "\midrule" _n
r; t=0.00 13:05:06

. file write V "\multicolumn{2}{l}{\textit{Panel A. McCrary (2008) density test of the running variable}} \\" _n
r; t=0.00 13:05:06

. file write V "\$T\$-statistic & `=string(`mc_T', "%6.3f")' \\" _n
r; t=0.00 13:05:06

. file write V "\$p\$-value     & `=string(`mc_p', "%6.3f")' \\[0.4em]" _n
r; t=0.00 13:05:06

. file write V "\multicolumn{2}{l}{\textit{Panel B. Joint balance F: regression of eligibility on JEEA pre-migration
>  covariates}} \\" _n
r; t=0.00 13:05:06

. foreach h in 40 60 100 {
  2.     local f`h'   = cond(`jt_F_h`h'' == ., "---", string(`jt_F_h`h'', "%6.3f"))
  3.     local p`h'   = cond(`jt_p_h`h'' == ., "---", string(`jt_p_h`h'', "%5.3f"))
  4. }
r; t=0.00 13:05:06

. file write V "\$F\$ at \$|date|\leq 40\$  & `f40' (\$p=`p40'\$) \\" _n
r; t=0.00 13:05:06

. file write V "\$F\$ at \$|date|\leq 60\$  & `f60' (\$p=`p60'\$) \\" _n
r; t=0.00 13:05:06

. file write V "\$F\$ at \$|date|\leq 100\$ & `f100' (\$p=`p100'\$) \\[0.4em]" _n
r; t=0.00 13:05:06

. file write V "\multicolumn{2}{l}{\textit{Panel C. First-stage discontinuity at the RAMV cutoff (panel sub-sample)}
> } \\" _n
r; t=0.00 13:05:06

. 
. local fs_pep_b_str   = cond(`fs_pep_b' == ., "---", string(`fs_pep_b', "%6.3f"))
r; t=0.00 13:05:06

. local fs_pep_s_str   = cond(`fs_pep_s' == ., "---", string(`fs_pep_s', "%6.3f"))
r; t=0.00 13:05:06

. local fs_pep_p_str   = cond(`fs_pep_p' == ., "---", string(`fs_pep_p', "%5.3f"))
r; t=0.00 13:05:06

. local fs_pep_n_str   = cond(`fs_pep_n' == ., "---", string(`fs_pep_n', "%6.0f"))
r; t=0.00 13:05:06

. local fs_pep_h_str   = cond(`fs_pep_h' == ., "---", string(`fs_pep_h', "%5.1f"))
r; t=0.00 13:05:06

. 
. local fs_hh_b_str    = cond(`fs_trt_hh_b' == ., "---", string(`fs_trt_hh_b', "%6.3f"))
r; t=0.00 13:05:06

. local fs_hh_s_str    = cond(`fs_trt_hh_s' == ., "---", string(`fs_trt_hh_s', "%6.3f"))
r; t=0.00 13:05:06

. local fs_hh_p_str    = cond(`fs_trt_hh_p' == ., "---", string(`fs_trt_hh_p', "%5.3f"))
r; t=0.00 13:05:06

. local fs_hh_n_str    = cond(`fs_trt_hh_n' == ., "---", string(`fs_trt_hh_n', "%6.0f"))
r; t=0.00 13:05:06

. local fs_hh_h_str    = cond(`fs_trt_hh_h' == ., "---", string(`fs_trt_hh_h', "%5.1f"))
r; t=0.00 13:05:06

. 
. local dt_pep_b_str   = cond(`dt_pep_b' == ., "---", string(`dt_pep_b', "%6.3f"))
r; t=0.00 13:05:06

. local dt_pep_s_str   = cond(`dt_pep_s' == ., "---", string(`dt_pep_s', "%6.3f"))
r; t=0.00 13:05:06

. local dt_pep_p_str   = cond(`dt_pep_p' == ., "---", string(`dt_pep_p', "%5.3f"))
r; t=0.00 13:05:06

. local dt_hh_b_str    = cond(`dt_trt_hh_b' == ., "---", string(`dt_trt_hh_b', "%6.3f"))
r; t=0.00 13:05:06

. local dt_hh_s_str    = cond(`dt_trt_hh_s' == ., "---", string(`dt_trt_hh_s', "%6.3f"))
r; t=0.00 13:05:06

. local dt_hh_p_str    = cond(`dt_trt_hh_p' == ., "---", string(`dt_trt_hh_p', "%5.3f"))
r; t=0.00 13:05:06

. 
. file write V "PEP take-up at W2, individual & `fs_pep_b_str' (`fs_pep_s_str'); p=`fs_pep_p_str'; h=`fs_pep_h_str';
>  N=`fs_pep_n_str' \\" _n
r; t=0.00 13:05:06

. file write V "PEP take-up at W2, household & `fs_hh_b_str' (`fs_hh_s_str'); p=`fs_hh_p_str'; h=`fs_hh_h_str'; N=`f
> s_hh_n_str' \\[0.3em]" _n
r; t=0.00 13:05:06

. file write V "Within-individual change in PEP, individual & `dt_pep_b_str' (`dt_pep_s_str'); p=`dt_pep_p_str' \\" 
> _n
r; t=0.00 13:05:06

. file write V "Within-individual change in PEP, household & `dt_hh_b_str' (`dt_hh_s_str'); p=`dt_hh_p_str' \\" _n
r; t=0.00 13:05:06

. file write V "\bottomrule" _n
r; t=0.00 13:05:06

. file write V "\end{tabular}" _n
r; t=0.00 13:05:06

. file write V "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:05:06

. file write V "\item \textit{Notes}: Validity exhibits for the first-differences fuzzy-RD specification, computed o
> n the panel sub-sample (units interviewed in both Wave 1 and Wave 2, sample\_reg=1). Panel A is the McCrary (2008)
>  density test of the running variable (days from the RAMV deadline of June 8, 2018). Panel B is the joint F-statis
> tic (with p-value in parentheses) from a linear regression of eligibility on the JEEA pre-migration covariates plu
> s the running variable, at three symmetric windows around the cutoff. Panel C reports first-stage discontinuities:
>  the LEVEL of PEP take-up at Wave 2 (the fuzzy treatment used by the FD regression, because PEP take-up is essenti
> ally time-invariant after 2018), and the within-individual change in PEP take-up between waves (mechanically near 
> zero, included for transparency). Standard error in parentheses. Estimator: rdrobust with triangular kernel, local
> -linear polynomial (p=1), MSE-optimal bandwidth h (in days). N is the within-bandwidth effective sample size." _n
r; t=0.00 13:05:06

. file write V "\end{tablenotes}" _n
r; t=0.00 13:05:06

. file write V "\end{threeparttable}" _n
r; t=0.00 13:05:06

. file write V "\end{table}" _n
r; t=0.00 13:05:06

. file close V
r; t=0.00 13:05:06

. di "  tabA_fd_validity.tex saved"
  tabA_fd_validity.tex saved
r; t=0.00 13:05:06

. 
. /*==============================================================================
>   BLOCK B — Per-outcome FD attrition
> ==============================================================================*/
. di ""

r; t=0.00 13:05:06

. di "=================================================================="
==================================================================
r; t=0.00 13:05:06

. di "  BLOCK B: per-outcome FD attrition"
  BLOCK B: per-outcome FD attrition
r; t=0.00 13:05:06

. di "=================================================================="
==================================================================
r; t=0.00 13:05:06

. 
. tempname A
r; t=0.00 13:05:06

. postfile `A' str30 outcome str8 trt double coef double se double pv double share_e double share_i double n double 
> h ///
>     using "$out/22d_fd_attrition.dta", replace
(file ../outputs/22d_fd_attrition.dta not found)
r; t=0.00 13:05:06

. 
. forvalues i = 1/`n' {
  2.     local y    : word `i' of `outcomes'
  3.     local t    : word `i' of `trts'
  4. 
.     use `pepsample', clear
  5.     keep if sample_reg == 1
  6.     keep if !missing(wave_num) & inlist(wave_num, 1, 2)
  7. 
.     capture confirm variable `y'
  8.     if _rc != 0 {
  9.         post `A' ("`y'") ("`t'") (.) (.) (.) (.) (.) (.) (.)
 10.         continue
 11.     }
 12. 
.     if "`t'" == "trt_hh" {
 13.         keep family_id wave_num date `y'
 14.         bys family_id wave_num: keep if _n == 1
 15.         local panelid family_id
 16.     }
 17.     else {
 18.         keep id family_id wave_num date `y'
 19.         bys id wave_num: keep if _n == 1
 20.         local panelid id
 21.     }
 22.     keep `panelid' wave_num date `y'
 23.     reshape wide date `y', i(`panelid') j(wave_num)
 24. 
.     capture confirm variable date1
 25.     if _rc == 0 gen date_use = date1
 26.     else        gen date_use = date2
 27. 
.     * FD-eligible indicator: non-missing in both waves
.     capture confirm variable `y'1
 28.     local has1 = (_rc == 0)
 29.     capture confirm variable `y'2
 30.     local has2 = (_rc == 0)
 31. 
.     if `has1' == 0 | `has2' == 0 {
 32.         post `A' ("`y'") ("`t'") (.) (.) (.) (.) (.) (.) (.)
 33.         continue
 34.     }
 35. 
.     gen fd_obs = !missing(`y'1) & !missing(`y'2)
 36. 
.     * Reduced-form sharp RD: fd_obs on date
.     capture rdrobust fd_obs date_use, c(0) ///
>         kernel(triangular) bwselect(mserd) p(1)
 37.     if !_rc & !missing(e(tau_cl)) {
 38.         local b  = e(tau_cl)
 39.         local s  = e(se_tau_cl)
 40.         local p  = e(pv_cl)
 41.         local nn = e(N_h_l) + e(N_h_r)
 42.         local hh = e(h_l)
 43.         qui sum fd_obs if date_use < 0 & date_use >= -e(h_l)
 44.         local share_i = r(mean)
 45.         qui sum fd_obs if date_use >= 0 & date_use <= e(h_l)
 46.         local share_e = r(mean)
 47.         post `A' ("`y'") ("`t'") (`b') (`s') (`p') (`share_e') (`share_i') (`nn') (`hh')
 48.     }
 49.     else {
 50.         post `A' ("`y'") ("`t'") (.) (.) (.) (.) (.) (.) (.)
 51.     }
 52. }
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                   jeea_index_wellbeing   ->   jeea_index_wellbeing1 jeea_index_wellbeing2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                          labour_income   ->   labour_income1 labour_income2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(9,207 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations            3,631   ->   2,219       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                           gasto_capita   ->   gasto_capita1 gasto_capita2
-----------------------------------------------------------------------------
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                             health_pca   ->   health_pca1 health_pca2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                    jeea_index_services   ->   jeea_index_services1 jeea_index_services2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                 sisben   ->   sisben1 sisben2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                   subs   ->   subs1 subs2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(9,207 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations            3,631   ->   2,219       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                  govtr   ->   govtr1 govtr2
-----------------------------------------------------------------------------
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                       jeea_index_labor   ->   jeea_index_labor1 jeea_index_labor2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                               employed   ->   employed1 employed2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                 formal   ->   formal1 formal2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                            hora_semana   ->   hora_semana1 hora_semana2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                      index_integration   ->   index_integration1 index_integration2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                              belonging   ->   belonging1 belonging2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                        feel_integrated   ->   feel_integrated1 feel_integrated2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                            col_friends   ->   col_friends1 col_friends2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                          community_org   ->   community_org1 community_org2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                    connection_colombia   ->   connection_colombia1 connection_colombia2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                            trust_index   ->   trust_index1 trust_index2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                          general_trust   ->   general_trust1 general_trust2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                              trust_col   ->   trust_col1 trust_col2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                              trust_ven   ->   trust_ven1 trust_ven2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                     colombians_help_me   ->   colombians_help_me1 colombians_help_me2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                    venezuelans_help_me   ->   venezuelans_help_me1 venezuelans_help_me2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                             index_food   ->   index_food1 index_food2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                             skip_meals   ->   skip_meals1 skip_meals2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                      went_without_food   ->   went_without_food1 went_without_food2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                           protein_days   ->   protein_days1 protein_days2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                          index_housing   ->   index_housing1 index_housing2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                       adequate_housing   ->   adequate_housing1 adequate_housing2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                        has_electricity   ->   has_electricity1 has_electricity2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                              has_water   ->   has_water1 has_water2
-----------------------------------------------------------------------------
(20 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   4   ->   5           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                             has_sewage   ->   has_sewage1 has_sewage2
-----------------------------------------------------------------------------
(20 missing values generated)
r; t=30.83 13:05:37

. postclose `A'
r; t=0.01 13:05:37

. 
. * Quick summary
. use "$out/22d_fd_attrition.dta", clear
r; t=0.01 13:05:37

. list outcome trt coef se pv share_e share_i, sep(0) noobs

  +--------------------------------------------------------------------------------------------+
  |              outcome      trt         coef          se          pv     share_e     share_i |
  |--------------------------------------------------------------------------------------------|
  | jeea_index_wellbeing      pep    .13449687   .06538448   .03968477   .62061856   .75221239 |
  |        labour_income      pep    .14069252   .07338926   .05522873    .4608209   .52959502 |
  |         gasto_capita   trt_hh   -.05064281   .09699125    .6015743   .58205128          .6 |
  |           health_pca      pep    .08722726   .06194096    .1590623   .62126866   .69470405 |
  |  jeea_index_services      pep    .12977038   .06491034   .04558403   .62061856   .75221239 |
  |               sisben      pep    .00514989   .05866555   .93004846   .56672158   .63276836 |
  |                 subs      pep    .05787645   .06487805   .37234977   .55456172   .63414634 |
  |     has_bank_account   trt_hh            .           .           .           .           . |
  |                govtr   trt_hh   -.06660479   .09243388   .47117606   .60606061   .64125561 |
  |     jeea_index_labor      pep     .0241399   .04294442   .57403454   .15090735   .14075286 |
  |             employed      pep   -.00044072   .05691859   .99382211   .29489796   .31095406 |
  |               formal      pep     .0241399   .04294442   .57403454   .15090735   .14075286 |
  |          hora_semana      pep    .03174692   .04263444   .45649489   .14065511   .13442623 |
  |    index_integration      pep    .00633306   .05874913   .91415558   .56440678   .63142857 |
  |            belonging      pep    .00700812   .05873583   .90502507   .55762712   .63142857 |
  |      feel_integrated      pep    .00263037   .05848357   .96412624   .56672158   .63276836 |
  |          col_friends      pep    .00654061   .05876342   .91137514   .56440678   .63142857 |
  |        community_org      pep   -.05667462   .05403858   .29427903   .56497948   .60465116 |
  |  connection_colombia      pep            0           0           .           0           0 |
  |          trust_index      pep   -.01459795   .05741249   .79929133   .56494523   .61666667 |
  |        general_trust      pep   -.03601949   .05555879   .51678254   .55259259   .61330049 |
  |            trust_col      pep    .03424156   .03787912   .36601164   .13475177   .15544041 |
  |            trust_ven      pep    .06840734   .03986351   .08615486   .14067612   .14484127 |
  |   colombians_help_me      pep     .0363068    .0380144   .33953709   .13779129   .14853195 |
  |  venezuelans_help_me      pep    .07283924   .04025195   .07036052   .14285714   .13333333 |
  |           index_food      pep    .13449687   .06538448   .03968477   .62061856   .75221239 |
  |           skip_meals      pep    .11623227   .06348514   .06712177   .62452107   .75833333 |
  |    went_without_food      pep    .13449687   .06538448   .03968477   .62061856   .75221239 |
  |         protein_days      pep     .1309044   .06502192   .04408991   .62061856   .75221239 |
  |        index_housing      pep    .12927359   .06485333   .04622616        .622   .76271186 |
  |     adequate_housing      pep    .12927359   .06485333   .04622616        .622   .76271186 |
  |      has_electricity      pep    .31157564   .07628428   .00004419   .61423221   .62359551 |
  |            has_water      pep    .31157564   .07628428   .00004419   .61423221   .62359551 |
  |           has_sewage      pep    .31119087    .0760368   .00004265   .61423221   .62359551 |
  +--------------------------------------------------------------------------------------------+
r; t=0.00 13:05:37

. 
. /*------------------------------------------------------------------
>   Write Table B: per-outcome FD attrition
> ------------------------------------------------------------------*/
. include "_OutcomeLabels.do"

. /*==============================================================================
>   _OutcomeLabels.do  (helper, not run on its own)
> 
>   Defines polished, publication-ready labels for every outcome that appears
>   in figures and tables. Labels use the macro pattern `lbl_<outcome>`.
>   Visualization do files `include` this file and reference `lbl_<outcome>`
>   to print a pretty label rather than the raw Stata variable name.
> 
>   Categorical/binary indicators are suffixed with "[=1]" so the reader sees
>   what a unit change means; counts and continuous variables get explicit
>   units; standardized indices are flagged "(SD)".
> 
>   Sandra Rozo
> ==============================================================================*/
. 
. * ---- Economic well-being -----------------------------------------------------
. local lbl_jeea_index_wellbeing  "Well-being index (SD)"
r; t=0.00 13:05:37

. local lbl_labour_income         "Log monthly labor income"
r; t=0.00 13:05:37

. local lbl_gasto_capita          "Log per-capita HH consumption"
r; t=0.00 13:05:37

. local lbl_income_maxhh          "Log HH-max labor income"
r; t=0.00 13:05:37

. local lbl_employed              "Employed [=1]"
r; t=0.00 13:05:37

. 
. * ---- Labor ------------------------------------------------------------------
. local lbl_jeea_index_labor      "Labor index (SD)"
r; t=0.00 13:05:37

. local lbl_formal                "Formal employment [=1]"
r; t=0.00 13:05:37

. local lbl_hora_semana           "Log weekly hours (salaried)"
r; t=0.00 13:05:37

. 
. * ---- Services and rights ----------------------------------------------------
. local lbl_jeea_index_services   "Services index (SD)"
r; t=0.00 13:05:37

. local lbl_sisben                "SISBEN registration [=1]"
r; t=0.00 13:05:37

. local lbl_subs                  "Subsidized health [=1]"
r; t=0.00 13:05:37

. local lbl_bank                  "Savings account [=1]"
r; t=0.00 13:05:37

. local lbl_has_bank_account      "Bank account (incl. savings) [=1]"
r; t=0.00 13:05:37

. local lbl_govtr                 "Govt. transfers [=1]"
r; t=0.00 13:05:37

. 
. * ---- Health -----------------------------------------------------------------
. local lbl_health_pca            "Health PCA index (SD)"
r; t=0.00 13:05:37

. local lbl_anx_depr              "Severe anxiety/depression [=1]"
r; t=0.00 13:05:37

. local lbl_any_anx_depr          "Any anxiety/depression [=1]"
r; t=0.00 13:05:37

. local lbl_vas_score             "Self-rated health (0-100)"
r; t=0.00 13:05:37

. local lbl_phys_problem          "Physical health problem [=1]"
r; t=0.00 13:05:37

. local lbl_chronic_illness       "Chronic illness [=1]"
r; t=0.00 13:05:37

. local lbl_mh_index              "Mental-health composite (SD)"
r; t=0.00 13:05:37

. local lbl_life_satisfaction     "Life satisfaction (0-10)"
r; t=0.00 13:05:37

. local lbl_hi5_inv               "EQ-5D anx/depr (5-low to 1-high)"
r; t=0.00 13:05:37

. 
. * ---- Food security ----------------------------------------------------------
. local lbl_index_food            "Food security index (SD)"
r; t=0.00 13:05:37

. local lbl_skip_meals            "Skipped meals last month [=1]"
r; t=0.00 13:05:37

. local lbl_went_without_food     "Went without food [=1]"
r; t=0.00 13:05:37

. local lbl_protein_days          "Days w/ protein (last week)"
r; t=0.00 13:05:37

. local lbl_food_insecure_seek    "Sought food assistance [=1]"
r; t=0.00 13:05:37

. 
. * ---- Housing ----------------------------------------------------------------
. local lbl_index_housing         "Housing quality index (SD)"
r; t=0.00 13:05:37

. local lbl_adequate_housing      "Adequate housing [=1]"
r; t=0.00 13:05:37

. local lbl_has_electricity       "Has electricity [=1]"
r; t=0.00 13:05:37

. local lbl_has_water             "Has running water [=1]"
r; t=0.00 13:05:37

. local lbl_has_sewage            "Has sewage [=1]"
r; t=0.00 13:05:37

. 
. * ---- Integration ------------------------------------------------------------
. local lbl_index_integration     "Integration index (SD)"
r; t=0.00 13:05:37

. local lbl_belonging             "Sense of belonging (1-4)"
r; t=0.00 13:05:37

. local lbl_feel_integrated       "Feels integrated (1-4)"
r; t=0.00 13:05:37

. local lbl_trust_col             "Trust in Colombians (out-group, 1-5)"
r; t=0.00 13:05:37

. local lbl_trust_ven             "Trust in Venezuelans (in-group, 1-5)"
r; t=0.00 13:05:37

. local lbl_general_trust         "General trust in people (1-5)"
r; t=0.00 13:05:37

. local lbl_venezuelans_help_me   "Venezuelans help me (1-5)"
r; t=0.00 13:05:37

. local lbl_trust_index           "Prosocial behaviors composite (SD)"
r; t=0.00 13:05:37

. local lbl_col_friends           "Number Colombian friends"
r; t=0.00 13:05:37

. local lbl_community_org         "Belongs to community org [=1]"
r; t=0.00 13:05:37

. local lbl_connection_colombia   "Strong connection to Colombia [=1]"
r; t=0.00 13:05:37

. local lbl_colombians_help_me    "Colombians help me (1-5)"
r; t=0.00 13:05:37

. local lbl_count_on_col          "Can count on Colombians (1-5)"
r; t=0.00 13:05:37

. 
. * ---- Discrimination ---------------------------------------------------------
. local lbl_index_discrim         "Discrimination index (SD)"
r; t=0.00 13:05:37

. local lbl_discrim_ever          "Ever discriminated against [=1]"
r; t=0.00 13:05:37

. local lbl_discrim_freq          "Discrimination frequency (1-5)"
r; t=0.00 13:05:37

. local lbl_filed_complaint       "Filed discrimination complaint [=1]"
r; t=0.00 13:05:37

. 
. * ---- Migration intentions ---------------------------------------------------
. local lbl_intend_stay           "Intends to stay in Colombia [=1]"
r; t=0.00 13:05:37

. local lbl_plan_stay_5yr         "Plans to stay 5+ years [=1]"
r; t=0.00 13:05:37

. local lbl_considered_return_ven "Considered returning to Venezuela [=1]"
r; t=0.00 13:05:37

. 
. * ---- COVID -----------------------------------------------------------------
. local lbl_index_covid           "COVID resilience index (SD)"
r; t=0.00 13:05:37

. local lbl_covid_income_down     "Income fell during COVID [=1]"
r; t=0.00 13:05:37

. local lbl_covid_eviction        "Faced eviction during COVID [=1]"
r; t=0.00 13:05:37

. local lbl_covid_received_aid    "Received COVID aid [=1]"
r; t=0.00 13:05:37

. 
. * ---- Education -------------------------------------------------------------
. local lbl_currently_studying    "Currently studying [=1]"
r; t=0.00 13:05:37

. local lbl_currently_enrolled    "Currently enrolled in school [=1]"
r; t=0.00 13:05:37

. local lbl_degree_validated      "Foreign degree validated [=1]"
r; t=0.00 13:05:37

. 
. * ---- Children --------------------------------------------------------------
. local lbl_child_skip_meals      "Child skipped meals [=1]"
r; t=0.00 13:05:37

. local lbl_child_vaccinated      "Child vaccinated [=1]"
r; t=0.00 13:05:37

. local lbl_child_worked          "Child worked [=1]"
r; t=0.00 13:05:37

. 
. * ---- Remittances -----------------------------------------------------------
. local lbl_index_remit           "Remittances index (SD)"
r; t=0.00 13:05:37

. local lbl_remit_now             "Sends remittances now [=1]"
r; t=0.00 13:05:37

. local lbl_remit_to_parents      "Remits to parents [=1]"
r; t=0.00 13:05:37

. 
. * ---- Financial access and digital ------------------------------------------
. local lbl_index_fin_access      "Financial access index (SD)"
r; t=0.00 13:05:37

. local lbl_index_digital         "Digital access index (SD)"
r; t=0.00 13:05:37

. local lbl_has_savings_account   "Has savings account [=1]"
r; t=0.00 13:05:37

. local lbl_has_mobile_money      "Has mobile money [=1]"
r; t=0.00 13:05:37

. local lbl_has_smartphone        "Has smartphone [=1]"
r; t=0.00 13:05:37

. local lbl_has_internet          "Has internet [=1]"
r; t=0.00 13:05:37

. local lbl_apps_whatsapp         "Uses WhatsApp [=1]"
r; t=0.00 13:05:37

. 
. * ============================================================================
. *  PREDETERMINED COVARIATES (used for balance tests and as RD controls)
. * ============================================================================
. 
. * ---- Demographics ----------------------------------------------------------
. local lbl_female                "Female [=1]"
r; t=0.00 13:05:37

. local lbl_age_panel             "Age (years)"
r; t=0.00 13:05:37

. local lbl_yrseduc               "Years of education"
r; t=0.00 13:05:37

. local lbl_time_col              "Years in Colombia"
r; t=0.00 13:05:37

. local lbl_child_venez           "Has child born in Venezuela [=1]"
r; t=0.00 13:05:37

. 
. * ---- Pre-migration economic conditions (in Venezuela) ----------------------
. local lbl_jobopp                "Had a job offer in Colombia [=1]"
r; t=0.00 13:05:37

. local lbl_labven                "Worked in Venezuela [=1]"
r; t=0.00 13:05:37

. local lbl_typeworkven1          "Worked in agric./manual (VZ) [=1]"
r; t=0.00 13:05:37

. local lbl_typeworkven2          "Worked in services (VZ) [=1]"
r; t=0.00 13:05:37

. local lbl_typeworkven3          "Worked in skilled occ. (VZ) [=1]"
r; t=0.00 13:05:37

. local lbl_written_cont          "Had written contract (VZ) [=1]"
r; t=0.00 13:05:37

. local lbl_average               "Avg. days worked / week (VZ)"
r; t=0.00 13:05:37

. local lbl_smartven              "Owned smartphone in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_owner                 "Homeowner in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_electven              "Had electricity in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_waterven              "Had running water in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_sewageven             "Had sewage in VZ [=1]"
r; t=0.00 13:05:37

. 
. * ---- Family / migration network -------------------------------------------
. local lbl_hhven_parents         "Parents born in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_hhven_spouse          "Spouse born in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_hhven_other           "Other HH members born in VZ [=1]"
r; t=0.00 13:05:37

. local lbl_healthmig             "Healthy at migration [=1]"
r; t=0.00 13:05:37

. local lbl_frdfam                "Network in Colombia [=1]"
r; t=0.00 13:05:37

. r; t=0.01 13:05:37

. 
. use "$out/22d_fd_attrition.dta", clear
r; t=0.00 13:05:37

. file open A using "$atab/tabA_fd_attrition.tex", write replace text
r; t=0.02 13:05:37

. file write A "\begin{table}[!htbp]" _n
r; t=0.00 13:05:37

. file write A "\centering" _n
r; t=0.00 13:05:37

. file write A "\caption{Per-outcome attrition for the first-differences fuzzy-RD specification: sharp-RD on the ind
> icator that the outcome is non-missing in both waves}" _n
r; t=0.00 13:05:37

. file write A "\label{tab:fd_attrition}" _n
r; t=0.00 13:05:37

. file write A "\begin{threeparttable}" _n
r; t=0.00 13:05:37

. file write A "\begin{tabular}{lcccccc}" _n
r; t=0.00 13:05:37

. file write A "\toprule" _n
r; t=0.00 13:05:37

. file write A "Outcome & Coefficient & Std.\ error & \$p\$-value & Eligible share & Ineligible share & Eff.\ N \\" 
> _n
r; t=0.00 13:05:37

. file write A "\midrule" _n
r; t=0.00 13:05:37

. forvalues r = 1/`=_N' {
  2.     local v       = outcome[`r']
  3.     local pretty  "`lbl_`v''"
  4.     if "`pretty'" == "" local pretty "`v'"
  5.     local b  = cond(coef[`r']    == ., "---", string(coef[`r'],    "%6.3f"))
  6.     local s  = cond(se[`r']      == ., "---", string(se[`r'],      "%6.3f"))
  7.     local p  = cond(pv[`r']      == ., "---", string(pv[`r'],      "%5.3f"))
  8.     local se_str  = cond(se[`r'] == ., "---", "(" + string(se[`r'], "%6.3f") + ")")
  9.     local sh_e = cond(share_e[`r'] == ., "---", string(share_e[`r'], "%5.3f"))
 10.     local sh_i = cond(share_i[`r'] == ., "---", string(share_i[`r'], "%5.3f"))
 11.     local nn = cond(n[`r']       == ., "---", string(n[`r'],       "%5.0f"))
 12.     file write A "`pretty' & `b' & `se_str' & `p' & `sh_e' & `sh_i' & `nn' \\" _n
 13. }
r; t=0.00 13:05:37

. file write A "\bottomrule" _n
r; t=0.00 13:05:37

. file write A "\end{tabular}" _n
r; t=0.00 13:05:37

. file write A "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:05:37

. file write A "\item \textit{Notes}: For each body-table outcome, the reported coefficient is the sharp regression-
> discontinuity estimate on an indicator equal to one if the outcome is non-missing in both Wave 1 and Wave 2 (the F
> D-eligible sub-sample for that outcome). A discontinuous coefficient signals differential FD-attrition for that ou
> tcome. \textit{Eligible share} and \textit{ineligible share} are within-bandwidth means of the FD-eligible indicat
> or on the eligible (date $\geq 0$) and ineligible (date $<0$) sides. Estimator: \texttt{rdrobust} with triangular 
> kernel, local-linear polynomial ($p=1$), MSE-optimal bandwidth, no covariate adjustment. Standard errors in parent
> heses." _n
r; t=0.00 13:05:37

. file write A "\end{tablenotes}" _n
r; t=0.00 13:05:37

. file write A "\end{threeparttable}" _n
r; t=0.00 13:05:37

. file write A "\end{table}" _n
r; t=0.00 13:05:37

. file close A
r; t=0.00 13:05:37

. di "  tabA_fd_attrition.tex saved"
  tabA_fd_attrition.tex saved
r; t=0.00 13:05:37

. 
. /*==============================================================================
>   BLOCK C — Lee bounds on FD point estimates
> ==============================================================================*/
. di ""

r; t=0.00 13:05:37

. di "=================================================================="
==================================================================
r; t=0.00 13:05:37

. di "  BLOCK C: Lee bounds on FD coefficients"
  BLOCK C: Lee bounds on FD coefficients
r; t=0.00 13:05:37

. di "=================================================================="
==================================================================
r; t=0.00 13:05:37

. 
. tempname L
r; t=0.00 13:05:37

. postfile `L' str30 outcome str8 trt double pt double lo double hi double q double n ///
>     using "$out/22d_fd_leebounds.dta", replace
(file ../outputs/22d_fd_leebounds.dta not found)
r; t=0.01 13:05:37

. 
. forvalues i = 1/`n' {
  2.     local y    : word `i' of `outcomes'
  3.     local t    : word `i' of `trts'
  4. 
.     use `pepsample', clear
  5.     keep if sample_reg == 1
  6.     keep if !missing(wave_num) & inlist(wave_num, 1, 2)
  7. 
.     capture confirm variable `y'
  8.     if _rc != 0 {
  9.         post `L' ("`y'") ("`t'") (.) (.) (.) (.) (.)
 10.         continue
 11.     }
 12. 
.     if "`t'" == "trt_hh" {
 13.         keep family_id wave_num date `t' `y'
 14.         bys family_id wave_num: keep if _n == 1
 15.         local panelid family_id
 16.     }
 17.     else {
 18.         keep id family_id wave_num date `t' `y'
 19.         bys id wave_num: keep if _n == 1
 20.         local panelid id
 21.     }
 22.     keep `panelid' wave_num date `t' `y'
 23.     reshape wide date `t' `y', i(`panelid') j(wave_num)
 24. 
.     capture confirm variable date1
 25.     if _rc == 0 gen date_use = date1
 26.     else        gen date_use = date2
 27. 
.     capture confirm variable `y'1
 28.     if _rc != 0 {
 29.         post `L' ("`y'") ("`t'") (.) (.) (.) (.) (.)
 30.         continue
 31.     }
 32.     capture confirm variable `y'2
 33.     if _rc != 0 {
 34.         post `L' ("`y'") ("`t'") (.) (.) (.) (.) (.)
 35.         continue
 36.     }
 37.     gen dy = `y'2 - `y'1
 38. 
.     capture confirm variable `t'2
 39.     if _rc != 0 {
 40.         post `L' ("`y'") ("`t'") (.) (.) (.) (.) (.)
 41.         continue
 42.     }
 43.     gen tr = `t'2
 44. 
.     * Step 1: optimal-bandwidth point estimate
.     capture rdrobust dy date_use, c(0) fuzzy(tr) ///
>         kernel(triangular) bwselect(mserd) p(1) all
 45.     if _rc | missing(e(tau_cl)) {
 46.         post `L' ("`y'") ("`t'") (.) (.) (.) (.) (.)
 47.         continue
 48.     }
 49.     local b_pt = e(tau_cl)
 50.     local h    = e(h_l)
 51.     local n_pt = e(N_h_l) + e(N_h_r)
 52. 
.     * Per-outcome attrition shares within bandwidth
.     qui count if date_use >  0 & date_use <=  `h' & !missing(dy)
 53.     local n_above = r(N)
 54.     qui count if date_use <  0 & date_use >= -`h' & !missing(dy)
 55.     local n_below = r(N)
 56.     if `n_above' == 0 | `n_below' == 0 {
 57.         post `L' ("`y'") ("`t'") (`b_pt') (.) (.) (.) (`n_pt')
 58.         continue
 59.     }
 60.     local n_diff = abs(`n_above' - `n_below')
 61.     local q      = `n_diff' / max(`n_above', `n_below')
 62.     if `n_diff' == 0 {
 63.         post `L' ("`y'") ("`t'") (`b_pt') (`b_pt') (`b_pt') (0) (`n_pt')
 64.         continue
 65.     }
 66.     if `n_above' > `n_below' local trim_cond "date_use >  0 & date_use <=  `h'"
 67.     else                     local trim_cond "date_use <  0 & date_use >= -`h'"
 68. 
.     capture drop __rk
 69.     egen __rk = rank(dy) if `trim_cond' & !missing(dy), unique
 70.     qui sum __rk
 71.     local max_rk = r(max)
 72. 
.     capture drop __keep_lo __keep_hi
 73.     gen __keep_lo = 1
 74.     gen __keep_hi = 1
 75.     replace __keep_lo = 0 if __rk >  `max_rk' - `n_diff' & !missing(__rk)
 76.     replace __keep_hi = 0 if __rk <= `n_diff'                & !missing(__rk)
 77. 
.     local b_lo .
 78.     local b_hi .
 79.     capture rdrobust dy date_use if __keep_lo == 1, c(0) fuzzy(tr) ///
>         kernel(triangular) h(`h') p(1) all
 80.     if !_rc local b_lo = e(tau_cl)
 81.     capture rdrobust dy date_use if __keep_hi == 1, c(0) fuzzy(tr) ///
>         kernel(triangular) h(`h') p(1) all
 82.     if !_rc local b_hi = e(tau_cl)
 83. 
.     drop __rk __keep_lo __keep_hi
 84. 
.     di "  Lee FD `y': pt=" %6.3f `b_pt' "  bounds=[" %6.3f `b_lo' "," %6.3f `b_hi' "]  q=" %5.3f `q'
 85.     post `L' ("`y'") ("`t'") (`b_pt') (`b_lo') (`b_hi') (`q') (`n_pt')
 86. }
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                   jeea_index_wellbeing   ->   jeea_index_wellbeing1 jeea_index_wellbeing2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,776 missing values generated)
(3,790 missing values generated)
(7,080 missing values generated)
(248 real changes made)
(248 real changes made)
  Lee FD jeea_index_wellbeing: pt=-0.224  bounds=[-0.893, 0.476]  q=0.341
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                          labour_income   ->   labour_income1 labour_income2
-----------------------------------------------------------------------------
(20 missing values generated)
(4,100 missing values generated)
(3,790 missing values generated)
(7,353 missing values generated)
(141 real changes made)
(141 real changes made)
  Lee FD labour_income: pt= 0.039  bounds=[-0.100, 0.113]  q=0.311
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(9,207 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations            3,631   ->   2,219       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                 trt_hh   ->   trt_hh1 trt_hh2
                           gasto_capita   ->   gasto_capita1 gasto_capita2
-----------------------------------------------------------------------------
(876 missing values generated)
(807 missing values generated)
(1,937 missing values generated)
(127 real changes made)
(127 real changes made)
  Lee FD gasto_capita: pt=-0.414  bounds=[-0.759, 0.199]  q=0.450
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                             health_pca   ->   health_pca1 health_pca2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,788 missing values generated)
(3,790 missing values generated)
(7,227 missing values generated)
(169 real changes made)
(169 real changes made)
  Lee FD health_pca: pt= 1.442  bounds=[ 0.090, 1.567]  q=0.291
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                    jeea_index_services   ->   jeea_index_services1 jeea_index_services2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,782 missing values generated)
(3,790 missing values generated)
(7,127 missing values generated)
(211 real changes made)
(211 real changes made)
  Lee FD jeea_index_services: pt= 0.348  bounds=[-0.447, 1.124]  q=0.310
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                                 sisben   ->   sisben1 sisben2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,066 missing values generated)
(3,790 missing values generated)
(7,000 missing values generated)
(317 real changes made)
(317 real changes made)
  Lee FD sisben: pt= 0.158  bounds=[-0.179, 0.366]  q=0.393
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                                   subs   ->   subs1 subs2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,209 missing values generated)
(3,790 missing values generated)
(7,109 missing values generated)
(244 real changes made)
(244 real changes made)
  Lee FD subs: pt=-0.002  bounds=[-0.148, 0.133]  q=0.350
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(9,207 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations            3,631   ->   2,219       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                 trt_hh   ->   trt_hh1 trt_hh2
                                  govtr   ->   govtr1 govtr2
-----------------------------------------------------------------------------
(811 missing values generated)
(807 missing values generated)
(1,997 missing values generated)
(86 real changes made)
(86 real changes made)
  Lee FD govtr: pt= 0.143  bounds=[ 0.118, 0.249]  q=0.387
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                       jeea_index_labor   ->   jeea_index_labor1 jeea_index_labor2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,711 missing values generated)
(3,790 missing values generated)
(7,583 missing values generated)
(109 real changes made)
(109 real changes made)
  Lee FD jeea_index_labor: pt= 0.814  bounds=[-4.707, 2.876]  q=0.487
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                               employed   ->   employed1 employed2
-----------------------------------------------------------------------------
(20 missing values generated)
(5,451 missing values generated)
(3,790 missing values generated)
(7,501 missing values generated)
(122 real changes made)
(122 real changes made)
  Lee FD employed: pt=-0.218  bounds=[-0.668, 0.031]  q=0.399
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                                 formal   ->   formal1 formal2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,711 missing values generated)
(3,790 missing values generated)
(7,583 missing values generated)
(109 real changes made)
(109 real changes made)
  Lee FD formal: pt= 0.143  bounds=[ 0.016, 0.131]  q=0.487
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                            hora_semana   ->   hora_semana1 hora_semana2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,785 missing values generated)
(3,790 missing values generated)
(7,626 missing values generated)
(79 real changes made)
(79 real changes made)
  Lee FD hora_semana: pt= 0.215  bounds=[-0.585, 0.405]  q=0.436
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                      index_integration   ->   index_integration1 index_integration2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,025 missing values generated)
(3,790 missing values generated)
(6,931 missing values generated)
(357 real changes made)
(357 real changes made)
  Lee FD index_integration: pt= 0.043  bounds=[-0.554, 0.505]  q=0.408
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                              belonging   ->   belonging1 belonging2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,042 missing values generated)
(3,790 missing values generated)
(7,055 missing values generated)
(264 real changes made)
(264 real changes made)
  Lee FD belonging: pt= 0.477  bounds=[-0.210, 1.024]  q=0.351
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                        feel_integrated   ->   feel_integrated1 feel_integrated2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,034 missing values generated)
(3,790 missing values generated)
(7,086 missing values generated)
(257 real changes made)
(257 real changes made)
  Lee FD feel_integrated: pt=-0.162  bounds=[-0.700, 0.361]  q=0.356
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                            col_friends   ->   col_friends1 col_friends2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,028 missing values generated)
(3,790 missing values generated)
(7,193 missing values generated)
(221 real changes made)
(221 real changes made)
  Lee FD col_friends: pt= 0.191  bounds=[-1.176, 1.635]  q=0.360
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                          community_org   ->   community_org1 community_org2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,054 missing values generated)
(3,790 missing values generated)
(7,003 missing values generated)
(318 real changes made)
(318 real changes made)
  Lee FD community_org: pt=-0.075  bounds=[-0.107,-0.064]  q=0.396
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                    connection_colombia   ->   connection_colombia1 connection_colombia2
-----------------------------------------------------------------------------
(20 missing values generated)
(7,807 missing values generated)
(3,790 missing values generated)
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                            trust_index   ->   trust_index1 trust_index2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,051 missing values generated)
(3,790 missing values generated)
(6,838 missing values generated)
(397 real changes made)
(397 real changes made)
  Lee FD trust_index: pt= 0.028  bounds=[-0.864, 1.426]  q=0.410
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                          general_trust   ->   general_trust1 general_trust2
-----------------------------------------------------------------------------
(20 missing values generated)
(3,062 missing values generated)
(3,790 missing values generated)
(6,919 missing values generated)
(362 real changes made)
(362 real changes made)
  Lee FD general_trust: pt= 0.100  bounds=[-0.625, 1.582]  q=0.408
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                              trust_col   ->   trust_col1 trust_col2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,636 missing values generated)
(3,790 missing values generated)
(7,677 missing values generated)
(34 real changes made)
(34 real changes made)
  Lee FD trust_col: pt= 2.074  bounds=[ 1.974, 2.159]  q=0.262
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                              trust_ven   ->   trust_ven1 trust_ven2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,624 missing values generated)
(3,790 missing values generated)
(7,717 missing values generated)
(35 real changes made)
(35 real changes made)
  Lee FD trust_ven: pt=-0.801  bounds=[-1.485,-0.558]  q=0.389
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                     colombians_help_me   ->   colombians_help_me1 colombians_help_me2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,649 missing values generated)
(3,790 missing values generated)
(7,723 missing values generated)
(29 real changes made)
(29 real changes made)
  Lee FD colombians_help_me: pt= 0.335  bounds=[ 0.104, 0.695]  q=0.345
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                    venezuelans_help_me   ->   venezuelans_help_me1 venezuelans_help_me2
-----------------------------------------------------------------------------
(20 missing values generated)
(6,625 missing values generated)
(3,790 missing values generated)
(7,687 missing values generated)
(56 real changes made)
(56 real changes made)
  Lee FD venezuelans_help_me: pt= 1.383  bounds=[ 0.112, 1.719]  q=0.467
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                             index_food   ->   index_food1 index_food2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,776 missing values generated)
(3,790 missing values generated)
(7,210 missing values generated)
(184 real changes made)
(184 real changes made)
  Lee FD index_food: pt= 0.369  bounds=[ 0.036, 0.570]  q=0.308
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                             skip_meals   ->   skip_meals1 skip_meals2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,795 missing values generated)
(3,790 missing values generated)
(7,192 missing values generated)
(201 real changes made)
(201 real changes made)
  Lee FD skip_meals: pt=-0.127  bounds=[-0.572, 0.216]  q=0.327
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                      went_without_food   ->   went_without_food1 went_without_food2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,776 missing values generated)
(3,790 missing values generated)
(4,087 missing values generated)
(2,424 real changes made)
(2,424 real changes made)
  Lee FD went_without_food: pt= 0.000  bounds=[ 0.000, 0.000]  q=0.652
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                           protein_days   ->   protein_days1 protein_days2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,797 missing values generated)
(3,790 missing values generated)
(7,011 missing values generated)
(287 real changes made)
(287 real changes made)
  Lee FD protein_days: pt= 2.565  bounds=[-0.092, 5.037]  q=0.361
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                          index_housing   ->   index_housing1 index_housing2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,786 missing values generated)
(3,790 missing values generated)
(7,137 missing values generated)
(225 real changes made)
(225 real changes made)
  Lee FD index_housing: pt= 0.548  bounds=[ 0.259, 0.720]  q=0.336
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                       adequate_housing   ->   adequate_housing1 adequate_housing2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,786 missing values generated)
(3,790 missing values generated)
(6,828 missing values generated)
(398 real changes made)
(398 real changes made)
  Lee FD adequate_housing: pt= 0.386  bounds=[ 0.125, 0.783]  q=0.407
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                        has_electricity   ->   has_electricity1 has_electricity2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,917 missing values generated)
(3,790 missing values generated)
(7,194 missing values generated)
(213 real changes made)
(213 real changes made)
  Lee FD has_electricity: pt=-0.010  bounds=[ 0.009,-0.020]  q=0.347
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                              has_water   ->   has_water1 has_water2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,917 missing values generated)
(3,790 missing values generated)
(7,059 missing values generated)
(277 real changes made)
(277 real changes made)
  Lee FD has_water: pt=-0.124  bounds=[-0.135,-0.068]  q=0.370
(PEP analysis sample (JEEA-style + extended outcome indices))
(742 observations deleted)
(0 observations deleted)
(0 observations deleted)
(j = 1 2)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations           12,838   ->   7,807       
Number of variables                   5   ->   7           
j variable (2 values)          wave_num   ->   (dropped)
xij variables:
                                   date   ->   date1 date2
                                    pep   ->   pep1 pep2
                             has_sewage   ->   has_sewage1 has_sewage2
-----------------------------------------------------------------------------
(20 missing values generated)
(2,926 missing values generated)
(3,790 missing values generated)
(7,344 missing values generated)
(168 real changes made)
(168 real changes made)
  Lee FD has_sewage: pt= 0.373  bounds=[ 0.081, 0.416]  q=0.363
r; t=39.100 13:06:17

. postclose `L'
r; t=0.01 13:06:17

. 
. /*------------------------------------------------------------------
>   Write Table C: FD Lee bounds
> ------------------------------------------------------------------*/
. use "$out/22d_fd_leebounds.dta", clear
r; t=0.01 13:06:17

. file open L using "$atab/tabA_fd_leebounds.tex", write replace text
r; t=0.02 13:06:17

. file write L "\begin{table}[!htbp]" _n
r; t=0.00 13:06:17

. file write L "\centering" _n
r; t=0.00 13:06:17

. file write L "\caption{Lee (2009) bounds for the first-differences fuzzy-RD point estimates}" _n
r; t=0.00 13:06:17

. file write L "\label{tab:fd_leebounds}" _n
r; t=0.00 13:06:17

. file write L "\begin{threeparttable}" _n
r; t=0.00 13:06:17

. file write L "\begin{tabular}{lcccccc}" _n
r; t=0.00 13:06:17

. file write L "\toprule" _n
r; t=0.00 13:06:17

. file write L "Outcome & Point & Lower & Upper & Trim \$q\$ & Same side? & Eff.\ N \\" _n
r; t=0.00 13:06:17

. file write L "\midrule" _n
r; t=0.00 13:06:17

. forvalues r = 1/`=_N' {
  2.     local v       = outcome[`r']
  3.     local pretty  "`lbl_`v''"
  4.     if "`pretty'" == "" local pretty "`v'"
  5.     local pt = cond(pt[`r'] == ., "---", string(pt[`r'], "%6.3f"))
  6.     local lo = cond(lo[`r'] == ., "---", string(lo[`r'], "%6.3f"))
  7.     local hi = cond(hi[`r'] == ., "---", string(hi[`r'], "%6.3f"))
  8.     local qq = cond(q[`r']  == ., "---", string(q[`r'],  "%5.3f"))
  9.     local nn = cond(n[`r']  == ., "---", string(n[`r'],  "%5.0f"))
 10.     local same "---"
 11.     if !missing(lo[`r']) & !missing(hi[`r']) {
 12.         if (lo[`r'] > 0 & hi[`r'] > 0) | (lo[`r'] < 0 & hi[`r'] < 0) local same "yes"
 13.         else                                                          local same "no"
 14.     }
 15.     file write L "`pretty' & `pt' & `lo' & `hi' & `qq' & `same' & `nn' \\" _n
 16. }
r; t=0.00 13:06:17

. file write L "\bottomrule" _n
r; t=0.00 13:06:17

. file write L "\end{tabular}" _n
r; t=0.00 13:06:17

. file write L "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:06:17

. file write L "\item \textit{Notes}: Lee (2009) trimming bounds applied to the first-differences fuzzy-RD point est
> imates (Tables 3-9, column 4). Methodology mirrors Section D.3: at the MSE-optimal bandwidth, identify the side of
>  the cutoff with the higher number of FD-observed units, trim the top fraction $q$ (lower bound) or bottom fractio
> n $q$ (upper bound) of the over-represented side's $\Delta Y$ distribution, and re-estimate. \textit{Same side?} i
> ndicates whether the lower and upper bounds lie on the same side of zero (i.e., whether the FD effect's sign survi
> ves worst-case selection). Estimator at all stages: \texttt{rdrobust} with triangular kernel, local-linear polynom
> ial ($p=1$), eligibility instrument; bounds are computed at the original MSE-optimal bandwidth. The trim fraction 
> $q$ equals the differential FD-attrition share." _n
r; t=0.00 13:06:17

. file write L "\end{tablenotes}" _n
r; t=0.00 13:06:17

. file write L "\end{threeparttable}" _n
r; t=0.00 13:06:17

. file write L "\end{table}" _n
r; t=0.00 13:06:17

. file close L
r; t=0.00 13:06:17

. di "  tabA_fd_leebounds.tex saved"
  tabA_fd_leebounds.tex saved
r; t=0.00 13:06:17

. 
. di ""

r; t=0.00 13:06:17

. di "=================================================================="
==================================================================
r; t=0.00 13:06:17

. di "  Done. Three tables saved to $atab/"
  Done. Three tables saved to ../outputs/appendix/tables/
r; t=0.00 13:06:17

. di "    tabA_fd_validity.tex"
    tabA_fd_validity.tex
r; t=0.00 13:06:17

. di "    tabA_fd_attrition.tex"
    tabA_fd_attrition.tex
r; t=0.00 13:06:17

. di "    tabA_fd_leebounds.tex"
    tabA_fd_leebounds.tex
r; t=0.00 13:06:17

. di "=================================================================="
==================================================================
r; t=0.00 13:06:17

. 
. log close
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/22d_FirstDiffValidity_log.txt
  log type:  text
 closed on:  25 Jun 2026, 13:06:17
--------------------------------------------------------------------------------------------------------------------
